<?php


namespace EleMe\OpenApi\Test;


use AlibabaCloud\Tea\Model;
use EleMe\OpenApi\Kernel\Factory;
use EleMe\OpenApi\Shop\Models\ChainstoreCreate;
use EleMe\OpenApi\Shop\Models\ChainstoreQueryDTO;
use EleMe\OpenApi\Shop\Models\ChainstoreQueryListDTO;
use EleMe\OpenApi\Shop\Models\ChainstoreUpdate;

class ShopClientTest extends \PHPUnit\Framework\TestCase
{
    public function testChainstoreListQuery(){
        $account = new TestAccount();
        Factory::setOptions($account->getTestAccount());
         $chainstoreQueryListDTO = new ChainstoreQueryListDTO();
        $chainstoreQueryListDTO -> pageNo = "1";
        $chainstoreQueryListDTO -> pageSize = "10";
        $result = Factory::shop()-> shop() ->getChainstoreQueryList($chainstoreQueryListDTO);
    }

    public function testChainstoreQuery(){
        $account = new TestAccount();
        Factory::setOptions($account->getTestAccount());
        $chainstoreQueryDTO= new ChainstoreQueryDTO();
        $chainstoreQueryDTO -> chainStoreId = "2334456";
        $result = Factory::shop()-> shop() ->chainstoreQuery($chainstoreQueryDTO);
    }


    public function testChainstoreCreate(){
        $account = new TestAccount();
        Factory::setOptions($account->getTestAccount());
        $chainstoreCreate = new ChainstoreCreate();
        $chainstoreCreate ->address = 'haha';
        $chainstoreCreate ->contactPhone = '17800000000';
        $chainstoreCreate ->longitude = '118.1342';
        $chainstoreCreate ->latitude = '40.235';
        $chainstoreCreate ->positionSource = 3;
        $chainstoreCreate ->outShopCode = 'testKFC003445';
        $chainstoreCreate ->categoryId = 12;
        $chainstoreCreate ->ownerName = '刘xx';
        $chainstoreCreate ->ownerIdNum = '410184191101011113';
        $chainstoreCreate ->handheldLicencePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate ->ownerIdPicBackHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate ->ownerIdPicFrontHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate ->creditCode = '910X11103345';
//        $chainstoreCreate -> secondMedicalEquipmentLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
//        $chainstoreCreate -> medicalInstitutionLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
//        $chainstoreCreate -> medicalEquipmentLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate -> businessLicencePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
//        $chainstoreCreate -> medicineLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate -> tabacooLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate -> foodLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreCreate -> settlementModel = 2;
        $chainstoreCreate -> settlementModel = 2;
        $chainstoreCreate -> settlementAccountId = '111';
        $chainstoreCreate -> headShopName = '门店构建名字测试';
        $result = Factory::shop()-> shop() ->chainstoreCreate($chainstoreCreate);

//       self::assertTrue($result ->chainStoreId == '204409643');
    }


    public function testChainstoreUpdate(){
        $account = new TestAccount();
        Factory::setOptions($account->getTestAccount());
        $chainstoreUpdate =new ChainstoreUpdate();
        $chainstoreUpdate ->chainStoreId = '204409643';
        $chainstoreUpdate ->creditCode = '910X11103345';
        $chainstoreUpdate -> headShopName = '门店构建名字测试';
        $chainstoreUpdate -> contactPhone = '17800000000';
        $chainstoreUpdate -> address = 'haha';
        $chainstoreUpdate ->longitude = '118.1342';
        $chainstoreUpdate ->latitude = '40.235';
        $chainstoreUpdate ->positionSource = 3;
        $chainstoreUpdate ->outShopCode = 'testKFC003445';
        $chainstoreUpdate ->categoryId = 12;
        $chainstoreUpdate ->ownerName = '刘xx';
        $chainstoreUpdate ->ownerIdNum = '410184191101011113';
        $chainstoreUpdate ->handheldLicencePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate ->ownerIdPicBackHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate ->ownerIdPicFrontHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate ->creditCode = '910X11103345';
        $chainstoreUpdate -> businessLicencePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> medicineLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> tabacooLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> foodLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> secondMedicalEquipmentLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> medicalInstitutionLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $chainstoreUpdate -> medicalEquipmentLicensePicHash = 'd7c64022f6458f9aa76968e01f5686c5jpeg';
        $result = Factory::shop()->shop()->chainstoreUpdate($chainstoreUpdate);
    }




}